#ifndef _NEW_INFO_H
#define _NEW_INFO_H

#include <gtk/gtk.h>
#include "clist.h"
#include "file.h"

struct newinfo_struct {
	struct file_ctrl *global_file;
	GtkWidget *window;
	struct clist_struct *clist;
	
	GtkWidget *label_name;
	GtkWidget *label_class;
	GtkWidget *label_tel;
	GtkWidget *label_mail;
	GtkWidget *label_blog;
	
	GtkWidget *label_help;
	GtkWidget *label_cancel;
	GtkWidget *label_ok;
	
	GtkWidget *entry_name;
	GtkWidget *entry_class;
	GtkWidget *entry_tel;
	GtkWidget *entry_mail;
	GtkWidget *entry_blog;
	
	GtkWidget *button_help;
	GtkWidget *button_cancel;
	GtkWidget *button_ok;
};

extern struct newinfo_struct newinfo;
GtkWidget* create_window_new_info (struct newinfo_struct *newinfo,
							struct clist_struct *clist);

void
on_button_new_info_help_clicked        (GtkButton       *button,
                                        gpointer         user_data);


void
on_button_new_info_cancel_clicked       (GtkButton       *button,
                                        gpointer         user_data);


void
on_button_new_info_ok_clicked          (GtkButton       *button,
                                        gpointer         user_data);

void
on_window_new_info_destroy             (GtkObject       *object,
                                        gpointer         user_data);
  
static void init_newinfo_struct(struct newinfo_struct *newinfo)
{
	newinfo->global_file=&global_file;
	newinfo->window = NULL;
	newinfo->clist =&clist;
	 
	newinfo->label_name = NULL;
	newinfo->label_class =NULL;
	newinfo->label_tel =NULL;
	newinfo->label_mail =NULL;
	newinfo->label_blog = NULL; 
	
	newinfo->label_help =NULL;
	newinfo->label_cancel =NULL;
	newinfo->label_ok =NULL;	
		
	newinfo->entry_name =NULL;
	newinfo->entry_class =NULL;
	newinfo->entry_tel =NULL;
	newinfo->entry_mail =NULL;
	newinfo->entry_blog = NULL;
}  
static void handle_for_create_new_info(gpointer user_data)
{
	newinfo.window=(GtkWidget *)create_window_new_info(&newinfo,&clist);
	gtk_widget_show(newinfo.window);
}                                      
#endif //_NEW_INFO_H
